﻿Imports System.IO
Imports System.Net
Imports System.Web
Imports System.Collections.Generic
Imports System.Math

''' <summary>
''' 高空气象数据站点
''' </summary>
''' <remarks></remarks>
Public Class RadiosondeData
    ''' <summary>
    ''' 判断是网上的数据还是来自选择的文件数据
    ''' </summary>
    ''' <remarks></remarks>
    Public mOnLine As Boolean = True  '判断是网上的数据还是来自选择的文件数据
    ''' <summary>
    ''' 格式标记
    ''' </summary>
    ''' <remarks></remarks>
    Public mNumber As Integer = 0  '格式标记

    Private m_RadiosondeDataOptions() As RadiosondeDataOption '高空数据选项

    Private m_StartDateTime As DateTime '开始日期
    Private m_EndDateTime As DateTime '结束日期
    Private m_PrintResultStr As String = "" '通过请求获得的最终字符串

    Private m_LongitudeValue As Double '经度
    Private m_LatitudeValue As Double '纬度

    Private m_Checkjw As Boolean = True '判断选择的是哪种情况
    Private m_ZoneGive As Integer = 0  '时区所给点的
    Private m_ArrDisSort() As Double '排顺的数组
    Private m_HeadZone As Integer = 0 '开头文件的时区
    Private m_StationElevation As Double = 0 '所在的海拔高度

    ''' <summary>
    ''' 标题信息
    ''' </summary>
    ''' <remarks></remarks>
    Private m_RadiosTitle As New ReconnaissanceTitleData '标题信息
    ''' <summary>
    ''' 整个流程
    ''' </summary>
    ''' <remarks></remarks>
    Private m_ArrReconnaissance As New ReconnaissanceDataConcourse

    ''' <summary>
    ''' 开始日期
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property StartDateTime() As DateTime
        Get
            Return m_StartDateTime
        End Get
        Set(ByVal value As DateTime)
            m_StartDateTime = value
        End Set
    End Property

    ''' <summary>
    ''' 结束日期
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property EndDateTime() As DateTime
        Get
            Return m_EndDateTime
        End Get
        Set(ByVal value As DateTime)
            m_EndDateTime = value
        End Set
    End Property

    ''' <summary>
    ''' 高空数据选项
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property RadiosondeDataOptions() As RadiosondeDataOption()
        Get
            Return m_RadiosondeDataOptions
        End Get
        Set(ByVal value As RadiosondeDataOption())
            m_RadiosondeDataOptions = value
        End Set
    End Property
    ''' <summary>
    ''' 通过请求获得的最终字符串
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property PrintResultStr() As String
        Get
            Return m_PrintResultStr
        End Get
        Set(ByVal value As String)
            m_PrintResultStr = value
        End Set
    End Property

    ''' <summary>
    ''' 经度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property LongitudeValue() As Double
        Get
            Return m_LongitudeValue
        End Get
        Set(ByVal value As Double)
            m_LongitudeValue = value
        End Set
    End Property
    ''' <summary>
    ''' 纬度
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property LatitudeValue() As Double
        Get
            Return m_LatitudeValue
        End Get
        Set(ByVal value As Double)
            m_LatitudeValue = value
        End Set
    End Property
    ''' <summary>
    ''' 判断选择的是哪种情况
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property Checkjw() As Boolean
        Get
            Return m_Checkjw
        End Get
        Set(ByVal value As Boolean)
            m_Checkjw = value
        End Set
    End Property
    ''' <summary>
    ''' 时区所给点的
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ZoneGive() As Integer
        Get
            Return m_ZoneGive
        End Get
        Set(ByVal value As Integer)
            m_ZoneGive = value
        End Set
    End Property
    ''' <summary>
    ''' 排顺数组
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArrDisSort() As Double()
        Get
            Return m_ArrDisSort
        End Get
        Set(ByVal value As Double())
            m_ArrDisSort = value
        End Set
    End Property

    ''' <summary>
    ''' 标题信息
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property RadiosTitle() As ReconnaissanceTitleData
        Get
            Return m_RadiosTitle
        End Get
        Set(ByVal value As ReconnaissanceTitleData)
            m_RadiosTitle = value
        End Set
    End Property

    ''' <summary>
    ''' 整个流程
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArrReconnaissance() As ReconnaissanceDataConcourse
        Get
            Return Me.m_ArrReconnaissance
        End Get
        Set(ByVal value As ReconnaissanceDataConcourse)
            Me.m_ArrReconnaissance = value
        End Set
    End Property
    ''' <summary>
    ''' 开头文件的时区 
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property HeadZone() As Integer
        Get
            Return m_HeadZone
        End Get
        Set(ByVal value As Integer)
            m_HeadZone = value
        End Set
    End Property

    ''' <summary>
    ''' 得到高空气象的源数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub ReadStrOption()
        Dim mFilesName As String = My.Application.Info.DirectoryPath & "\" & "RadiosondeDatabase.txt"
        FileClose(1)
        FileOpen(1, mFilesName, OpenMode.Input)
        If My.Computer.FileSystem.FileExists(mFilesName) = True Then
            Dim j As Integer = 0
            Dim mZone As Integer = 0
            Do Until EOF(1)
                Dim Str As String = LineInput(1)
                Dim StrNumber As Integer = StringHandle.GetStringNumber(Str) '得到字符串个数
                If StringHandle.GetString(Str, StrNumber) = "CN" Then
                    Dim Pnumber As Integer = 8 '标识为到了第N个字符串
                    '得到所要的字符串
                    ReDim Preserve RadiosondeDataOptions(j)
                    RadiosondeDataOptions(j) = New RadiosondeDataOption
                    RadiosondeDataOptions(j).RegionStr = StringHandle.GetString(Str, 2)
                    RadiosondeDataOptions(j).Atmospheric = StringHandle.GetString(Str, 3)
                    RadiosondeDataOptions(j).StationNumber = StringHandle.GetString(Str, 4)
                    RadiosondeDataOptions(j).Longitude = StringHandle.GetString(Str, 6)
                    RadiosondeDataOptions(j).Latitude = StringHandle.GetString(Str, 5)
                    RadiosondeDataOptions(j).HightId = StringHandle.GetString(Str, 7)

                    'Dim latdd As Double
                    'Dim logdd As Double
                    'If RadiosondeDataOptions(j).Longitude > 0 Then
                    '    latdd = RadiosondeDataOptions(j).Longitude
                    '    mZone = 31 + Math.Truncate(RadiosondeDataOptions(j).Longitude / 6)
                    'ElseIf RadiosondeDataOptions(j).Longitude > 0 Then
                    '    latdd = 0 - RadiosondeDataOptions(j).Longitude
                    '    mZone = 30 - Math.Truncate(RadiosondeDataOptions(j).Longitude / 6)
                    'End If
                    'If RadiosondeDataOptions(j).Latitude > 0 Then
                    '    logdd = RadiosondeDataOptions(j).Latitude
                    'ElseIf RadiosondeDataOptions(j).Latitude < 0 Then
                    '    logdd = 0 - RadiosondeDataOptions(j).Latitude
                    'End If
                    'If ZoneGive <= mZone Then
                    '    If mZone - ZoneGive < 2 Then
                    '        mZone = ZoneGive
                    '        Dim Cov As New UTM.Cover
                    '        Dim UTMPoint As New UTM.UTMPoint
                    '        UTMPoint = Cov.GeoToUtm(latdd, logdd, 32600 + mZone)
                    '        RadiosondeDataOptions(j).AixsLongitude = UTMPoint.x
                    '        RadiosondeDataOptions(j).AixsLatitude = UTMPoint.y
                    '    Else
                    '        RadiosondeDataOptions(j).AixsLongitude = 9999999999
                    '        RadiosondeDataOptions(j).AixsLatitude = 9999999999
                    '    End If
                    'End If
                    'If ZoneGive > mZone Then
                    '    If ZoneGive - mZone < 2 Then
                    '        Dim Cov As New UTM.Cover
                    '        Dim UTMPoint As New UTM.UTMPoint
                    '        UTMPoint = Cov.GeoToUtm(latdd, logdd, 32600 + mZone)
                    '        RadiosondeDataOptions(j).AixsLongitude = UTMPoint.x
                    '        RadiosondeDataOptions(j).AixsLatitude = UTMPoint.y
                    '    Else
                    '        RadiosondeDataOptions(j).AixsLongitude = 9999999999
                    '        RadiosondeDataOptions(j).AixsLatitude = 9999999999
                    '    End If
                    'End If
                    '处理字符串中的空格
                    If StrNumber > 10 Then
                        For i As Integer = Pnumber To StrNumber - 2
                            RadiosondeDataOptions(j).AreasName = RadiosondeDataOptions(j).AreasName + StringHandle.GetString(Str, Pnumber) & " "
                            Pnumber = Pnumber + 1
                        Next
                        RadiosondeDataOptions(j).AreasName.Trim()
                    Else
                        RadiosondeDataOptions(j).AreasName = StringHandle.GetString(Str, Pnumber)
                    End If
                    RadiosondeDataOptions(j).ArearNameTure = RadiosondeDataOptions(j).AreasName
                    '处理字符串中的括号 / '\
                    Dim mStrF As String = ""
                    Dim mStr As String = ""
                    For i As Integer = 0 To RadiosondeDataOptions(j).AreasName.Length - 1
                        mStr = RadiosondeDataOptions(j).AreasName.Substring(i, 1)
                        If mStr = "(" Then
                            mStrF = mStrF + "%28"
                            Continue For
                        End If
                        If mStr = ")" Then
                            mStrF = mStrF + "%29"
                            Continue For
                        End If
                        If mStr = "/" Then
                            mStrF = mStrF + "%2F"
                            Continue For
                        End If
                        If mStr = "'" Then
                            mStrF = mStrF + "%27"
                            Continue For
                        End If
                        If mStr = "\" Then
                            mStrF = mStrF + "%5C"
                            Continue For
                        End If
                        mStrF = mStrF + mStr
                    Next
                    RadiosondeDataOptions(j).AreasName = mStrF

                    RadiosondeDataOptions(j).NotNameId = StringHandle.GetString(Str, StrNumber - 1)
                    RadiosondeDataOptions(j).Identifier = StringHandle.GetString(Str, StrNumber)
                    j = j + 1
                End If

                If EOF(1) = False Then
                    LineInput(1)
                End If
            Loop
        Else
            MsgBox("文件格式有错误!", MsgBoxStyle.Information, "提示")
        End If
        FileClose(1)
        CaCulationDistance()
    End Sub

    ''' <summary>
    ''' 根据经纬度算距离
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub CaCulationDistance()
        ReDim ArrDisSort(RadiosondeDataOptions.Length - 1)

        Dim m As Double
        For i As Integer = 0 To ArrDisSort.Length - 1

            'm = Math.Sqrt((LongitudeValue - RadiosondeDataOptions(i).AixsLongitude) ^ 2 + (LatitudeValue - RadiosondeDataOptions(i).AixsLatitude) ^ 2)
            m = GetDistance(LatitudeValue, LongitudeValue, RadiosondeDataOptions(i).Latitude, RadiosondeDataOptions(i).Longitude)
            ArrDisSort(i) = m
            RadiosondeDataOptions(i).Distances = m
        Next
        Array.Sort(ArrDisSort) '排序
    End Sub
    '计算距离
    Function GetDistance(ByVal lat1 As Double, ByVal lng1 As Double, ByVal lat2 As Double, ByVal lng2 As Double)
        Dim radLat1, radLat2, mLat, mLong, s As Double
        Const mEeathRadius As Double = 6378.137
        radLat1 = rad(lat1)
        radLat2 = rad(lat2)
        mLat = radLat1 - radLat2
        mLong = rad(lng1) - rad(lng2)
        s = 2 * Math.Asin(Math.Sqrt(Math.Pow(Math.Sin(mLat / 2), 2) + Math.Cos(radLat1) * Math.Cos(radLat2) * Math.Pow(Math.Sin(mLong / 2), 2)))
        s = s * mEeathRadius
        s = Math.Round(s * 10000) / 10000
        Return s
    End Function

    Function rad(ByVal d As Double)
        Return d * Math.PI / 180.0
    End Function

    ''' <summary>
    ''' 获得相应的网络数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub GetStrReslut(ByVal Urlstrs As String)
        Dim url As New Uri(Urlstrs) '定义一个URI
        Dim Req As WebRequest
        Req = WebRequest.Create(url)
        Dim Resp As WebResponse
        Try
            Resp = Req.GetResponse '获得一个响应
            Dim netStream As StreamReader
            netStream = New StreamReader(Resp.GetResponseStream)
            Dim a As String
            a = netStream.ReadToEnd
            PrintResultStr = a
        Catch exc As Exception
            MsgBox(exc.Message)
        End Try
    End Sub

    ''' <summary>
    ''' NOAA/ESRL 数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Function ShowNOAAESRL() As String
        'Dim mStartUrl As String = "http://raob.fsl.noaa.gov/intl/GetRaobs.cgi?bdate="
        Dim mStartUrl As String = "http://esrl.noaa.gov/raobs/intl/GetRaobs.cgi?bdate="

        'Dim mEndUrl As String = "&osort=Station+Series+Sort&oformat=FSL+format+%28ASCII+text%29"
        Dim mStartDateTimeStr As String = ""         '获得开始日期
        Dim mEndDateTimeStr As String = "&edate="    '获得结束日期
        '单位 Knots 方式
        'Dim mStrMid As String = "&access=WMO+Station+Identifier&view=NO&States=States&Countries=Countries&shour=All+Times&ltype=All+Levels&wunits=Knots&stationlist=YES&station_list="
        '单位 Tenths of Meters/Second 方式
        Dim mStrMid As String = "&access=WMO+Station+Identifier&view=NO&States=States&Countries=Countries&shour=All+Times&ltype=All+Levels&wunits=Tenths+of+Meters%2FSecond&stationlist=YES&station_list="
        '月
        If StartDateTime.Month < 10 Then
            mStartDateTimeStr = mStartDateTimeStr + StartDateTime.Year.ToString + "0" + StartDateTime.Month.ToString
        Else
            mStartDateTimeStr = mStartDateTimeStr + StartDateTime.Year.ToString + StartDateTime.Month.ToString
        End If
        '日
        If StartDateTime.Day < 10 Then
            mStartDateTimeStr = mStartDateTimeStr + "0" + StartDateTime.Day.ToString
        Else
            mStartDateTimeStr = mStartDateTimeStr + StartDateTime.Day.ToString
        End If
        '小时
        mStartDateTimeStr = mStartDateTimeStr + StartDateTime.Hour.ToString + "0"
        '结束日期格式
        If EndDateTime.Month < 10 Then
            mEndDateTimeStr = mEndDateTimeStr + EndDateTime.Year.ToString + "0" + EndDateTime.Month.ToString
        Else
            mEndDateTimeStr = mEndDateTimeStr + EndDateTime.Year.ToString + EndDateTime.Month.ToString
        End If

        If EndDateTime.Day < 10 Then
            mEndDateTimeStr = mEndDateTimeStr + "0" + EndDateTime.Day.ToString
        Else
            mEndDateTimeStr = mEndDateTimeStr + EndDateTime.Day.ToString
        End If
        mEndDateTimeStr = mEndDateTimeStr + EndDateTime.Hour.ToString
        Dim mLastStrUrl As String = "" '整个字符串请求
        mLastStrUrl = mLastStrUrl + mStartUrl + mStartDateTimeStr + mEndDateTimeStr + mStrMid
        Return mLastStrUrl
    End Function

    Private m_ArryUrlAtmos() As String '用于存储Atmospheric Soundings网站多个月份的网址
    ''' <summary>
    ''' 用于存储Atmospheric Soundings网站多个月份的网址
    ''' </summary>
    ''' <value></value>
    ''' <returns></returns>
    ''' <remarks></remarks>
    Property ArryUrlAtmos() As String()
        Get
            Return m_ArryUrlAtmos
        End Get
        Set(ByVal value As String())
            m_ArryUrlAtmos = value
        End Set
    End Property

    ''' <summary>
    ''' Atmospheric Soundings网站的数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub ShowAtmosphericSoundings()
        Dim mStarUrl As String = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
        Dim mStartDatetimestr As String = ""
        Dim mMoonth As String = "&MONTH="
        Dim mSDayth As String = "&FROM="
        Dim mEDayth As String = "&TO="

        If EndDateTime >= StartDateTime Then
            '同年同月的情况
            If EndDateTime.Year = StartDateTime.Year And EndDateTime.Month = StartDateTime.Month Then
                mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                mStartDatetimestr = ""
                mMoonth = "&MONTH="
                mSDayth = "&FROM="
                mEDayth = "&TO="
                mStartDatetimestr = StartDateTime.Year.ToString
                '月
                If StartDateTime.Month < 10 Then
                    mMoonth = mMoonth + "0" + StartDateTime.Month.ToString
                Else
                    mMoonth = mMoonth + StartDateTime.Month.ToString
                End If
                '日
                If StartDateTime.Day < 10 Then
                    mSDayth = mSDayth + "0" + StartDateTime.Day.ToString
                Else
                    mSDayth = mSDayth + StartDateTime.Day.ToString
                End If
                mSDayth = mSDayth + "00"
                '结束日
                If EndDateTime.Day < 10 Then
                    mEDayth = mEDayth + "0" + EndDateTime.Day.ToString
                Else
                    mEDayth = mEDayth + EndDateTime.Day.ToString
                End If
                mEDayth = mEDayth + "12"

                ReDim Preserve ArryUrlAtmos(0)
                ArryUrlAtmos(0) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
            End If
            '同年不同月的情况
            If EndDateTime.Year = StartDateTime.Year Then
                If EndDateTime.Month > StartDateTime.Month Then
                    mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                    mStartDatetimestr = ""
                    mMoonth = "&MONTH="
                    mSDayth = "&FROM="
                    mEDayth = "&TO="

                    '年
                    mStartDatetimestr = StartDateTime.Year.ToString
                    '月
                    If StartDateTime.Month < 10 Then
                        mMoonth = mMoonth + "0" + StartDateTime.Month.ToString
                    Else
                        mMoonth = mMoonth + StartDateTime.Month.ToString
                    End If
                    '日
                    If StartDateTime.Day < 10 Then
                        mSDayth = mSDayth + "0" + StartDateTime.Day.ToString
                    Else
                        mSDayth = mSDayth + StartDateTime.Day.ToString
                    End If
                    mSDayth = mSDayth + "00"
                    '结束日
                    Dim k As Integer = 0
                    While StartDateTime.AddDays(k).Month = StartDateTime.Month
                        k = k + 1
                    End While
                    k = k - 1
                    If StartDateTime.AddDays(k).Day < 10 Then
                        mEDayth = mEDayth + "0" + StartDateTime.AddDays(k).Day.ToString
                    Else
                        mEDayth = mEDayth + StartDateTime.AddDays(k).Day.ToString
                    End If
                    mEDayth = mEDayth + "12"
                    ReDim Preserve ArryUrlAtmos(0)
                    ArryUrlAtmos(0) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
                    '整个月----------------------------
                    Dim mCountMoons As Integer = 1
                    While StartDateTime.AddMonths(mCountMoons).AddDays(-StartDateTime.Day + 1) < EndDateTime.AddDays(-EndDateTime.Day + 1)
                        Dim aaa As Date = StartDateTime.AddMonths(mCountMoons).AddDays(-StartDateTime.Day + 1)

                        mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                        mStartDatetimestr = ""
                        mMoonth = "&MONTH="
                        mSDayth = "&FROM="
                        mEDayth = "&TO="
                        '年
                        mStartDatetimestr = StartDateTime.Year.ToString
                        '月
                        If StartDateTime.AddMonths(mCountMoons).Month < 10 Then
                            mMoonth = mMoonth + "0" + StartDateTime.AddMonths(mCountMoons).Month.ToString
                        Else
                            mMoonth = mMoonth + StartDateTime.AddMonths(mCountMoons).Month.ToString
                        End If
                        '日
                        mSDayth = mSDayth + "01"
                        mSDayth = mSDayth + "00"
                        '结束日
                        mEDayth = mEDayth + ShowDay(StartDateTime.AddMonths(mCountMoons)).ToString
                        mEDayth = mEDayth + "12"
                        ReDim Preserve ArryUrlAtmos(mCountMoons)
                        ArryUrlAtmos(mCountMoons) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
                        mCountMoons = mCountMoons + 1
                    End While

                    mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                    mStartDatetimestr = ""
                    mMoonth = "&MONTH="
                    mSDayth = "&FROM="
                    mEDayth = "&TO="
                    '年
                    mStartDatetimestr = StartDateTime.Year.ToString
                    '月
                    If StartDateTime.AddMonths(mCountMoons).Month < 10 Then
                        mMoonth = mMoonth + "0" + StartDateTime.AddMonths(mCountMoons).Month.ToString
                    Else
                        mMoonth = mMoonth + StartDateTime.AddMonths(mCountMoons).Month.ToString
                    End If
                    '日
                    mSDayth = mSDayth + "01"
                    mSDayth = mSDayth + "00"
                    '结束日
                    If EndDateTime.Day < 10 Then
                        mEDayth = mEDayth + "0" + EndDateTime.Day.ToString
                    Else
                        mEDayth = mEDayth + EndDateTime.Day.ToString
                    End If
                    mEDayth = mEDayth + "12"
                    ReDim Preserve ArryUrlAtmos(mCountMoons)
                    ArryUrlAtmos(mCountMoons) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
                End If
            End If
            '不同年月日
            If EndDateTime.Year - StartDateTime.Year > 0 Then
                mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                mStartDatetimestr = ""
                mMoonth = "&MONTH="
                mSDayth = "&FROM="
                mEDayth = "&TO="
                '年
                mStartDatetimestr = StartDateTime.Year.ToString
                '月
                If StartDateTime.Month < 10 Then
                    mMoonth = mMoonth + "0" + StartDateTime.Month.ToString
                Else
                    mMoonth = mMoonth + StartDateTime.Month.ToString
                End If
                '日
                If StartDateTime.Day < 10 Then
                    mSDayth = mSDayth + "0" + StartDateTime.Day.ToString
                Else
                    mSDayth = mSDayth + StartDateTime.Day.ToString
                End If
                mSDayth = mSDayth + "00"
                '结束日
                Dim k As Integer = 0
                While StartDateTime.AddDays(k).Month = StartDateTime.Month
                    k = k + 1
                End While
                k = k - 1
                If StartDateTime.AddDays(k).Day < 10 Then
                    mEDayth = mEDayth + "0" + StartDateTime.AddDays(k).Day.ToString
                Else
                    mEDayth = mEDayth + StartDateTime.AddDays(k).Day.ToString
                End If
                mEDayth = mEDayth + "12"
                ReDim Preserve ArryUrlAtmos(0)
                ArryUrlAtmos(0) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
                '一年中的整个月
                Dim mStartme As Date = StartDateTime
                Dim mEndme As Date = EndDateTime
                Dim mCountYear As Integer = 1
                While mStartme.AddMonths(mCountYear).AddDays(-mStartme.Day + 1) < mEndme.AddDays(-mEndme.Day + 1)
                    mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                    mStartDatetimestr = ""
                    mMoonth = "&MONTH="
                    mSDayth = "&FROM="
                    mEDayth = "&TO="
                    '年
                    mStartDatetimestr = mStartme.AddMonths(mCountYear).Year.ToString
                    '月
                    If mStartme.AddMonths(mCountYear).Month < 10 Then
                        mMoonth = mMoonth + "0" + mStartme.AddMonths(mCountYear).Month.ToString
                    Else
                        mMoonth = mMoonth + mStartme.AddMonths(mCountYear).Month.ToString
                    End If
                    '日
                    mSDayth = mSDayth + "01"
                    mSDayth = mSDayth + "00"
                    '结束日
                    mEDayth = mEDayth + ShowDay(mStartme.AddMonths(mCountYear)).ToString
                    mEDayth = mEDayth + "12"
                    ReDim Preserve ArryUrlAtmos(mCountYear)
                    ArryUrlAtmos(mCountYear) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
                    mCountYear = mCountYear + 1
                End While
                mStarUrl = "http://weather.uwyo.edu/cgi-bin/sounding?region=naconf&TYPE=TEXT%3ALIST&YEAR="
                mStartDatetimestr = ""
                mMoonth = "&MONTH="
                mSDayth = "&FROM="
                mEDayth = "&TO="
                '年
                mStartDatetimestr = EndDateTime.Year.ToString
                '月
                If EndDateTime.Month < 10 Then
                    mMoonth = mMoonth + "0" + EndDateTime.Month.ToString
                Else
                    mMoonth = mMoonth + EndDateTime.Month.ToString
                End If
                '日
                mSDayth = mSDayth + "01"
                mSDayth = mSDayth + "00"
                '结束日
                If EndDateTime.Day < 10 Then
                    mEDayth = mEDayth + "0" + EndDateTime.Day.ToString
                Else
                    mEDayth = mEDayth + EndDateTime.Day.ToString
                End If
                mEDayth = mEDayth + "12"
                ReDim Preserve ArryUrlAtmos(mCountYear)
                ArryUrlAtmos(mCountYear) = mStarUrl + mStartDatetimestr + mMoonth + mSDayth + mEDayth
            End If
        End If
    End Sub

    ''' <summary>
    ''' 判断某个月有多少天
    ''' </summary>
    ''' <remarks></remarks>
    Public Function ShowDay(ByVal mDatetimes As Date) As Integer
        Dim mDays As Integer = 0
        If mDatetimes.Month = 2 Then
            '闰年
            Dim mYear As Integer = mDatetimes.Year
            If mDatetimes.IsLeapYear(mYear) Then
                mDays = 29
            Else
                mDays = 28
            End If
        Else
            If mDatetimes.Month = 1 Or mDatetimes.Month = 3 Or mDatetimes.Month = 5 Or mDatetimes.Month = 7 Or mDatetimes.Month = 8 Or mDatetimes.Month = 10 Or mDatetimes.Month = 12 Then
                mDays = 31
            Else
                mDays = 30
            End If
        End If
        Return mDays
    End Function

    'Private mFilesName As String = My.Application.Info.DirectoryPath & "\" & "AirData.txt"

    ''' <summary>
    ''' 对网上提供的数据的转换，探空NOAA/ESRL 数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub TranslateData(ByVal mFilesName As String)
        Dim mUnit As String = "" '单位的标记
        Dim mDefult1 As String = ""  '默认标记值99999或32767
        Dim mDefult2 As String = ""  '默认标记值99999或32767

        Dim mdlg As Boolean = False '判断是否出现对话框

        Dim StrDate() As String = {"JAN", "FEB", "MAR", "APR", "MAY", "JUN", "JUL", "AUG", "SEP", "OCT", "NOV", "DEC"}
        'mFilesName = My.Application.Info.DirectoryPath & "\" & "AirData.txt"
        'If My.Computer.FileSystem.FileExists(My.Application.Info.DirectoryPath & "\" & "AirData.txt") = True Then
        If My.Computer.FileSystem.FileExists(mFilesName) = True Then
            Dim j As Integer = 0
            Dim k As Integer = 0
            FileClose(1)
            FileOpen(1, mFilesName, OpenMode.Input)
            Do Until EOF(1)
                Dim Str As String = LineInput(1)
                If StringHandle.GetStringNumber(Str) = 5 Then
                    k = 0
                    ReDim Preserve ArrReconnaissance.ArrReconnaissance(j)
                    ArrReconnaissance.ArrReconnaissance(j) = New ReconnaissanceData
                    ArrReconnaissance.ArrReconnaissance(j).Year = StringHandle.GetString(Str, 5)
                    '判断是几月份
                    For i As Integer = 0 To StrDate.Length - 1
                        If StrDate(i) = StringHandle.GetString(Str, 4) Then
                            If i < 9 Then
                                ArrReconnaissance.ArrReconnaissance(j).Month = "0" + (i + 1).ToString
                            Else
                                ArrReconnaissance.ArrReconnaissance(j).Month = (i + 1).ToString
                            End If
                        End If
                    Next
                    '判断第几日
                    If Integer.Parse(StringHandle.GetString(Str, 3)) < 10 Then
                        ArrReconnaissance.ArrReconnaissance(j).Day = "0" + StringHandle.GetString(Str, 3)
                    Else
                        ArrReconnaissance.ArrReconnaissance(j).Day = StringHandle.GetString(Str, 3)
                    End If
                    '判断第几时
                    If Integer.Parse(StringHandle.GetString(Str, 2)) > 0 And Integer.Parse(StringHandle.GetString(Str, 2)) < 10 Then
                        ArrReconnaissance.ArrReconnaissance(j).Time = "0" + StringHandle.GetString(Str, 2)
                    Else
                        ArrReconnaissance.ArrReconnaissance(j).Time = StringHandle.GetString(Str, 2)
                    End If
                    If EOF(1) = False Then
                        Dim Str2 As String = LineInput(1)
                        m_RadiosTitle.WeatherID = StringHandle.GetString(Str2, 3)
                        m_RadiosTitle.Longitude = StringHandle.GetString(Str2, 4)
                        m_RadiosTitle.Latitude = StringHandle.GetString(Str2, 5)
                        '所在海拔高度
                        m_StationElevation = StringHandle.GetString(Str2, StringHandle.GetStringNumber(Str2) - 1)
                        m_RadiosTitle.TerraHeight = m_StationElevation
                        If m_RadiosTitle.Longitude.Length > 9 Then
                            Dim bb As String = m_RadiosTitle.Longitude
                            '以下几行代码是分开经纬度的
                            Dim aa As String = ""
                            Dim cc As String = ""
                            For i As Integer = 0 To m_RadiosTitle.Longitude.Length - 1
                                aa = m_RadiosTitle.Longitude.Substring(i, 1)
                                cc = cc + aa
                                If aa >= "A" And aa <= "Z" Then
                                    m_RadiosTitle.Latitude = cc
                                    aa = ""
                                    Exit For
                                End If
                            Next
                            m_RadiosTitle.Longitude = bb.Substring(m_RadiosTitle.Latitude.Length, bb.Length - cc.Length).Trim
                        End If
                        If Mid(m_RadiosTitle.Longitude, m_RadiosTitle.Longitude.Length, 1) >= "A" And Mid(m_RadiosTitle.Longitude, m_RadiosTitle.Longitude.Length, 1) <= "Z" Then
                            HeadZone = Math.Abs(Math.Round(Mid(m_RadiosTitle.Longitude, 1, m_RadiosTitle.Longitude.Length - 1) / 15))
                        Else
                            HeadZone = Math.Abs(Math.Round(m_RadiosTitle.Longitude / 15))  '时区
                        End If
                        m_RadiosTitle.TimeZone = HeadZone
                        ArrReconnaissance.ArrReconnaissance(j).Time = ArrReconnaissance.ArrReconnaissance(j).Time + HeadZone
                        If ArrReconnaissance.ArrReconnaissance(j).Time >= 0 And ArrReconnaissance.ArrReconnaissance(j).Time < 10 Then
                            ArrReconnaissance.ArrReconnaissance(j).Time = "0" & ArrReconnaissance.ArrReconnaissance(j).Time
                        End If
                    Else
                        Exit Do
                    End If
                    Dim Str1 As String = LineInput(1)
                    ArrReconnaissance.ArrReconnaissance(j).TierCount = Integer.Parse(StringHandle.GetString(Str1, 5)) - 4 '层
                    mDefult1 = StringHandle.GetString(Str1, 6)
                    If EOF(1) = False Then
                        Dim Str2 As String = LineInput(1)
                        mUnit = StringHandle.GetString(Str2, 4)
                        mDefult2 = StringHandle.GetString(Str2, 3)

                        '数据格式的判断
                        If mOnLine = False Then
                            If mDefult1 = "99999" Or mDefult2 = "99999" Then
                                mNumber = 0
                            ElseIf mDefult1 = "32767" Or mDefult2 = "32767" Then
                                mNumber = 1
                            Else
                                If mdlg = False Then
                                    Dim dlg As New dlgOptionFormat
                                    If dlg.ShowDialog = DialogResult.OK Then
                                        mNumber = dlg.m_SSS.mNumber
                                        mdlg = True
                                    End If
                                End If
                            End If
                        End If

                    Else
                        Exit Do
                    End If
                    j = j + 1
                    Continue Do
                End If

                If StringHandle.GetStringNumber(Str) = 7 Then

                    ReDim Preserve ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k)
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k) = New ReconnaissanceTiterData
                    If mNumber = 0 Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).Pa = Integer.Parse(StringHandle.GetString(Str, 2))
                    ElseIf mNumber = 1 Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).Pa = Integer.Parse(StringHandle.GetString(Str, 2)) * 10
                    End If

                    If StringHandle.GetString(Str, 3) = "99999" Or StringHandle.GetString(Str, 3) = "32767" Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DistanceTerraHeight = "-99999"
                    Else
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DistanceTerraHeight = StringHandle.GetString(Str, 3) - m_StationElevation
                    End If
                    If StringHandle.GetString(Str, 4) = "99999" Or StringHandle.GetString(Str, 4) = "32767" Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DryTemperature = "-9990"
                    Else
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DryTemperature = CInt(StringHandle.GetString(Str, 4))
                    End If
                    If StringHandle.GetString(Str, 5) = "99999" Or StringHandle.GetString(Str, 5) = "32767" Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DewPointTemperature = "-9990"
                    Else
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DewPointTemperature = CInt(StringHandle.GetString(Str, 5))
                    End If
                    If StringHandle.GetString(Str, 6) = "99999" Or StringHandle.GetString(Str, 6) = "32767" Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindVane = "999"
                    Else
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindVane = StringHandle.GetString(Str, 6)
                    End If
                    If StringHandle.GetString(Str, 7) = "99999" Or StringHandle.GetString(Str, 7) = "32767" Then
                        ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindSpeed = "9990"
                    Else

                        If mUnit = "ms" Then

                            Dim mSum As Double = Convert.ToDouble((StringHandle.GetString(Str, 7)))
                            mSum = FormatNumber(mSum, 1)
                            ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindSpeed = mSum
                        ElseIf mUnit = "kt" Then
                            Dim mSun As Double = (StringHandle.GetString(Str, 7)) * 1852 / 3600 * 10
                            mSun = FormatNumber(mSun, 1)
                            ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindSpeed = mSun
                        End If
                    End If
                    k = k + 1
                End If
            Loop
            FileClose(1)
            If ArrReconnaissance.ArrReconnaissance IsNot Nothing AndAlso ArrReconnaissance.ArrReconnaissance.Length > 0 Then
                m_RadiosTitle.StartTime = ArrReconnaissance.ArrReconnaissance(0).Year + "年" + ArrReconnaissance.ArrReconnaissance(0).Month + "月" + ArrReconnaissance.ArrReconnaissance(0).Day
                m_RadiosTitle.EndTime = ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Year + "年" + ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Month + "月" + ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Day
            End If
        End If
    End Sub

    ''' <summary>
    '''  对网上提供的数据的转换，探空 Atmospheric Soundings网站的数据
    ''' </summary>
    ''' <remarks></remarks>
    Public Sub TranslateAtmospheric()
        Dim mFileName As String = My.Application.Info.DirectoryPath & "\" & "AirData.txt"
        Dim StrDate() As String = {"Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"}
        Dim mCheckFirstData As Integer = 0 '当为第二次记录时退出循环
        FileOpen(1, mFileName, OpenMode.Input)
        Do Until EOF(1)
            Dim Str As String = LineInput(1)
            If Str = "</PRE><H3>Station information and sounding indices</H3><PRE>" Then
                mCheckFirstData = mCheckFirstData + 1
            End If
            '获得纬度
            If Str.Contains("Station latitude:") Then
                m_RadiosTitle.Latitude = StringHandle.GetString(Str, StringHandle.GetStringNumber(Str)) & "N"
            End If
            '获得经度
            If Str.Contains("Station longitude:") Then
                m_RadiosTitle.Longitude = StringHandle.GetString(Str, StringHandle.GetStringNumber(Str)) & "E"
                HeadZone = Math.Abs(Math.Round(Mid(m_RadiosTitle.Longitude, 1, m_RadiosTitle.Longitude.Length - 1) / 15))
                m_RadiosTitle.TimeZone = HeadZone
            End If
            '得到所在的海拔高度
            If Str.Contains("Station elevation:") Then
                m_StationElevation = StringHandle.GetString(Str, StringHandle.GetStringNumber(Str))
                m_RadiosTitle.TerraHeight = m_StationElevation
            End If
            If mCheckFirstData >= 2 Then
                Exit Do
            End If
        Loop
        FileClose(1)

        FileOpen(1, mFileName, OpenMode.Input)
        Dim j As Integer = 0
        Dim k As Integer = 0
        Dim p As Boolean = False
        Dim ps As Boolean = False
        Do Until EOF(1)
            Dim Str As String = LineInput(1)
            If Str <> "" Then
                If Mid(Str, 1, 4) = "<H2>" Then
                    Dim mTempStr As String = Str '临时存储数据
                    ReDim Preserve ArrReconnaissance.ArrReconnaissance(j)
                    ArrReconnaissance.ArrReconnaissance(j) = New ReconnaissanceData  ' ReconnaissanceData
                    m_RadiosTitle.WeatherID = StringHandle.GetString(mTempStr, 1).Substring(4, StringHandle.GetString(mTempStr, 1).Length - 4)
                    ArrReconnaissance.ArrReconnaissance(j).Year = Mid(StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr)), 1, 4)
                    '判断第几月
                    For i As Integer = 0 To StrDate.Length - 1
                        If StrDate(i) = StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 1) Then
                            If i < 9 Then
                                ArrReconnaissance.ArrReconnaissance(j).Month = "0" + (i + 1).ToString
                            Else
                                ArrReconnaissance.ArrReconnaissance(j).Month = (i + 1).ToString
                            End If
                        End If
                    Next
                    '判断第几日
                    ArrReconnaissance.ArrReconnaissance(j).Day = StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 2)
                    '判断第几时
                    ArrReconnaissance.ArrReconnaissance(j).Time = Mid(StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 3), 1, 2)
                    ArrReconnaissance.ArrReconnaissance(j).Time = ArrReconnaissance.ArrReconnaissance(j).Time + HeadZone
                    If ArrReconnaissance.ArrReconnaissance(j).Time > 0 And ArrReconnaissance.ArrReconnaissance(j).Time < 10 Then
                        ArrReconnaissance.ArrReconnaissance(j).Time = "0" + ArrReconnaissance.ArrReconnaissance(j).Time
                    End If
                    LineInput(1)
                    LineInput(1)
                    LineInput(1)
                    LineInput(1)
                    Str = LineInput(1)
                    If Str = "-----------------------------------------------------------------------------" Then
                        Str = LineInput(1)
                        If Mid(StringHandle.GetString(Str, 1), 1, 1) >= "0" And Mid(StringHandle.GetString(Str, 1), 1, 1) <= "9" Then
                            j = j + 1
                            p = True
                            ps = False
                            k = 0
                        Else
                            If Mid(Str, 1, 4) = "<H2>" Then
                                mTempStr = Str '临时存储数据
                                ReDim Preserve ArrReconnaissance.ArrReconnaissance(j)
                                ArrReconnaissance.ArrReconnaissance(j) = New ReconnaissanceData  ' ReconnaissanceData
                                m_RadiosTitle.WeatherID = StringHandle.GetString(mTempStr, 1).Substring(4, StringHandle.GetString(mTempStr, 1).Length - 4)
                                ArrReconnaissance.ArrReconnaissance(j).Year = Mid(StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr)), 1, 4)
                                '判断第几月
                                For i As Integer = 0 To StrDate.Length - 1
                                    If StrDate(i) = StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 1) Then
                                        If i < 10 Then
                                            ArrReconnaissance.ArrReconnaissance(j).Month = "0" + (i + 1).ToString
                                        Else
                                            ArrReconnaissance.ArrReconnaissance(j).Month = (i + 1).ToString
                                        End If
                                    End If
                                Next
                                '判断第几日
                                ArrReconnaissance.ArrReconnaissance(j).Day = StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 2)
                                '判断第几时
                                ArrReconnaissance.ArrReconnaissance(j).Time = Mid(StringHandle.GetString(mTempStr, StringHandle.GetStringNumber(mTempStr) - 3), 1, 2)
                                ArrReconnaissance.ArrReconnaissance(j).Time = ArrReconnaissance.ArrReconnaissance(j).Time + HeadZone
                                If ArrReconnaissance.ArrReconnaissance(j).Time < 10 Then
                                    ArrReconnaissance.ArrReconnaissance(j).Time = "0" + ArrReconnaissance.ArrReconnaissance(j).Time
                                End If
                                'If ArrReconnaissance.ArrReconnaissance(j).Time = "00" Then
                                '    ArrReconnaissance.ArrReconnaissance(j).Time = 24
                                'End If
                                LineInput(1)
                                LineInput(1)
                                LineInput(1)
                                LineInput(1)
                                LineInput(1)
                                Str = LineInput(1)
                                j = j + 1
                                p = True
                                ps = False
                                k = 0
                            End If
                        End If
                    End If
                End If
            End If
            If Str = "</PRE><H3>Station information and sounding indices</H3><PRE>" Then
                p = False
                ps = True
                ArrReconnaissance.ArrReconnaissance(j - 1).TierCount = k '具有的层数
            End If

            If p = True And ps = False Then
                Dim mZero As Integer = 0
                ReDim Preserve ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k)
                ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k) = New ReconnaissanceTiterData

                If Mid(Str, 1, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).Pa = CInt(StringHandle.GetString(Str, 1) * 10)
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).Pa = 99999
                    mZero = mZero + 1
                End If
                If Mid(Str, 8, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DistanceTerraHeight = StringHandle.GetString(Str, 2 - mZero) - m_StationElevation
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DistanceTerraHeight = -99999
                    mZero = mZero + 1
                End If
                If Mid(Str, 15, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DryTemperature = CInt(StringHandle.GetString(Str, 3 - mZero) * 10)
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DryTemperature = -9990
                    mZero = mZero + 1
                End If
                If Mid(Str, 22, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DewPointTemperature = CInt(StringHandle.GetString(Str, 4 - mZero) * 10)
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).DewPointTemperature = -9990
                    mZero = mZero + 1
                End If
                If Mid(Str, 29, 7) = "       " Then
                    mZero = mZero + 1
                End If
                If Mid(Str, 36, 7) = "       " Then
                    mZero = mZero + 1
                End If
                If Mid(Str, 43, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindVane = StringHandle.GetString(Str, 7 - mZero)
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindVane = 999
                    mZero = mZero + 1
                End If
                If Mid(Str, 50, 7) <> "       " Then
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindSpeed = CDbl(Math.Round(StringHandle.GetString(Str, 8 - mZero) * 1852 / 3600, 1)) * 10
                Else
                    ArrReconnaissance.ArrReconnaissance(j - 1).ArrtierData(k).WindSpeed = 9990
                    mZero = mZero + 1
                End If
                k = k + 1
            End If
        Loop
        FileClose(1)
        If ArrReconnaissance.ArrReconnaissance IsNot Nothing AndAlso ArrReconnaissance.ArrReconnaissance.Length > 0 Then
            m_RadiosTitle.StartTime = ArrReconnaissance.ArrReconnaissance(0).Year + "年" + ArrReconnaissance.ArrReconnaissance(0).Month + "月" + ArrReconnaissance.ArrReconnaissance(0).Day
            m_RadiosTitle.EndTime = ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Year + "年" + ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Month + "月" + ArrReconnaissance.ArrReconnaissance(ArrReconnaissance.ArrReconnaissance.Length - 1).Day
        End If
    End Sub
End Class
